/*
 * Copyright (c) 2023 Huawei Technologies Co., Ltd.
 * openUBMC is licensed under Mulan PSL v2.
 * You can use this software according to the terms and conditions of the Mulan PSL v2.
 * You may obtain a copy of Mulan PSL v2 at:
 *         http://license.coscl.org.cn/MulanPSL2
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PSL v2 for more details.
 */

#ifndef GEN_OPTICAL_MODULE_STATUS_INTERFACE_H
#define GEN_OPTICAL_MODULE_STATUS_INTERFACE_H

#include <device_tree/base.h>

namespace dev::gen {

class MC_API OpticalModule_Status : public mc::engine::interface<OpticalModule_Status> {
public:
    MC_INTERFACE("bmc.dev.OpticalModule.Status")

    property<double>              SupplyVoltage;                       ///< 光模块供电电压
    property<double>              VoltageUpperThresholdCritical;       ///< 电压上限阈值
    property<double>              VoltageLowerThresholdCritical;       ///< 电压下限阈值
    property<std::vector<double>> RXPowerMilliWatts;                   ///< Rx接收功率
    property<double>              RXPowerLowerThresholdCritical;       ///< Rx接收功率下限阈值
    property<double>              RXPowerUpperThresholdCritical;       ///< Rx接收功率上限阈值
    property<std::vector<double>> TXPowerMilliWatts;                   ///< Tx发送功率
    property<double>              TXPowerLowerThresholdCritical;       ///< Tx发送功率下限阈值
    property<double>              TXPowerUpperThresholdCritical;       ///< Tx发送功率上限阈值
    property<std::vector<double>> TXBiasCurrentMilliAmps;              ///< Tx发送电流
    property<double>              TXBiasCurrentLowerThresholdCritical; ///< Tx发送电流下限阈值
    property<double>              TXBiasCurrentUpperThresholdCritical; ///< Tx发送电流上限阈值
    property<uint8_t>             PowerState; ///< 功率异常标志位（用于告警）
    property<uint32_t>            FaultState; ///< 故障状态
    property<double>              BiasCurrentTXUpperThresholdWarning; ///< 发送偏置电流警告上限阈值
    property<double>              BiasCurrentTXLowerThresholdWarning; ///< 发送偏置电流警告下限阈值
    property<double>              PowerTXUpperThresholdWarning;       ///< 发送功率警告上限阈值
    property<double>              PowerTXLowerThresholdWarning;       ///< 发送功率警告下限阈值
    property<double>              PowerRXUpperThresholdWarning;       ///< 接收功率警告上限阈值
    property<double>              PowerRXLowerThresholdWarning;       ///< 接收功率警告下限阈值
    property<double>              TemperatureLowerThresholdWarning;   ///< 低温警告阈值
    property<double>              TemperatureUpperThresholdWarning;   ///< 高温警告阈值
    property<double>              VoltageLowerThresholdWarning;       ///< 低压警告阈值
    property<double>              VoltageUpperThresholdWarning;       ///< 高压警告阈值
};
} // namespace dev::gen

#endif // GEN_OPTICAL_MODULE_STATUS_INTERFACE_H
